<?php

namespace App\Models;

use App\User;
use Illuminate\Database\Eloquent\Model;

class UserLog extends Core
{
    const TABLE = 'user_logs';
    protected $table = self::TABLE;

    public static function createInstance($type, $user_id, $operation,  $before, $after, $remark, $staff_ip, $staff_id){

        $logs = new UserLog();
        $logs->type = $type;
        $logs->user_id = $user_id;
        $logs->operation = $operation;
        $logs->before = $before;
        $logs->after = $after;
        $logs->remark = $remark;
        $logs->staff_id = $staff_id;
        $logs->ip = $staff_ip;

        return $logs;
    }

}
